@import url(pace-minimal.css);
@import url(Artalk.css);

html {
	/* 背景图片覆盖整个页面 */
	background-size: cover;
	/* 背景图片不重复 */
	background-repeat: no-repeat;
	/* 确保背景图片始终居中 */
	background-position: center;
	/* 背景图片固定位置 */
	background-attachment: fixed;
	transition: background-color 0.2s var(--mdui-motion-easing-standard);
	overflow: visible;
	scrollbar-width: thin;
	max-height: 100vh;
}

body {
	/* 取消边距确保全屏 */
	margin: 0;
	z-index: -20;
}

//微调card样式
.mdui-theme-dark mdui-card {
	background-color: rgb(var(--mdui-color-surface-container));
}

.mdui-theme-auto mdui-card {
	@media (prefers-color-scheme: dark) {
		background-color: rgb(var(--mdui-color-surface-container));
	}
}

.glass {
	mdui-dialog {
		&::part(overlay) {
			backdrop-filter: blur(0.75px);
		}

		&::part(panel) {
			background-color: rgba(var(--mdui-color-surface-container-high), 0.35);
			&::before {
				backdrop-filter: blur(6.5px);
				-webkit-backdrop-filter: blur(6.5px);
				content: "";
				position: absolute;
				inset: 0;
				z-index: -1;
			}
		}

		mdui-top-app-bar[slot="header"] {
			background-color: rgba(var(--mdui-color-surface-container-high), 0.25);
		}
	}

	// 仅对没有 service-card 类的 mdui-card 生效
	mdui-card:not(.service-card)::before {
		backdrop-filter: blur(6.5px);
		-webkit-backdrop-filter: blur(6.5px);
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
	}

	mdui-menu {
		background-color: rgba(var(--mdui-color-surface-container), 0.9);
		backdrop-filter: blur(5px);
	}

	.glass-border, mdui-menu, #content .actions, mdui-dialog::part(panel), mdui-navigation-drawer::part(panel) {
		border: 1px solid rgba(255, 255, 255, 0.15);
	}
}

.mdui-theme-dark .glass mdui-card {
	background-color: rgba(var(--mdui-color-surface-container), 0.75);
}

.mdui-theme-light .glass mdui-card {
	background-color: rgba(var(--mdui-color-surface-container-low), 0.5);
}

.mdui-theme-auto .glass mdui-card {
	@media (prefers-color-scheme: dark) {
		background-color: rgba(var(--mdui-color-surface-container), 0.75);
	}

	@media (prefers-color-scheme: light) {
		background-color: rgba(var(--mdui-color-surface-container-low), 0.5);
	}
}

/* mdui1.0风格a标签 */
a {
	position: relative;
	display: inline-block;
	overflow: hidden;
	text-decoration: none;
	vertical-align: top;
	outline: none;
	color: rgb(var(--mdui-color-primary));

	&::before {
		position: absolute;
		top: auto;
		bottom: 1px;
		left: 0;
		width: 100%;
		height: 1px;
		background-color: rgb(var(--mdui-color-primary));
		transform: scaleX(0);
		backface-visibility: hidden;
		transition: all 0.2s;
		content: ' ';
	}

	&:hover::before,
	&:focus::before {
		transform: scaleX(1);
	}
}

@keyframes imgRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(1turn);
    }
}

.imgRotate {
	animation: imgRotate 30s linear infinite;
}

.imgRotate-pause {
	animation-play-state: paused!important;
}

mdui-snackbar {
	.iconsnackbar {
		display: flex;
		align-items: center;
		justify-content: center;
		text-justify: center;
	}

	.mdui-theme-auto & a {
		@media (prefers-color-scheme: dark) {
			color: rgb(var(--mdui-color-primary-light)) !important;
		}

		@media (prefers-color-scheme: light) {
			color: rgb(var(--mdui-color-primary-dark)) !important;
		}

		&::before {
			@media (prefers-color-scheme: dark) {
				background-color: rgb(var(--mdui-color-primary-light)) !important;
			}

			@media (prefers-color-scheme: light) {
				background-color: rgb(var(--mdui-color-primary-dark)) !important;
			}
		}
	}

	.mdui-theme-dark & a {
		color: rgb(var(--mdui-color-primary-light)) !important;
		&::before {
			background-color: rgb(var(--mdui-color-primary-light)) !important;
		}
	}

	.mdui-theme-light & a {
		color: rgb(var(--mdui-color-primary-dark)) !important;
		&::before {
			background-color: rgb(var(--mdui-color-primary-dark)) !important;
		}
	}
}

mdui-text-field[variant=outlined]::part(label) {
    background-color: rgba(var(--mdui-color-surface-container-high));
}